An index is a collection of text files, combined for easy viewing. The files will be displayed in two levels, called chapters and sections in these notes. Every index will have at least one chapter, each containing one or more sections. Indexes can be created, opened, and modified within Easy View. Printing is not supported.
Once an index is open, the left pane shows the chapters and the middle pane shows the sections in the index. The current chapter and the current section are highlighted in the respective lists. Some information about the open file is shown (optionally) on the upper-right pane.
This index, "Easy View - Read Me", combines two text files: "Easy View Introduction" and "Easy View Notes", as indicated on the upper-right pane.
----------
Format
The format of an index defines the chapters and sections contained in the files. It is, in general, indicated by separation lines that are made up of identical characters, like hyphens or asterisks. The formats that are currently recognized by Easy View are explained below:
1. Plain: This is in fact "no format at all". The whole file becomes a single section. The only chapter and section are both named after the file.
2. Simple: Sections are separated by hyphens and chapters by asterisks. The first line in each chapter or section is assumed to be its name. (This file is an example of simple format.)
3. setext: Sections are separated by hyphens and chapters by equal signs. Unlike the simple format, the names _precede_ the separation lines. Moreover, the apparent length of the name and its separator must be the same. This makes setext slightly more difficult to enter manually, but much more robust in comparison to Simple format. (Weekly TidBITS issues and the "Easy View Introduction" file are examples of setext format.)
4. Digest: This is basically for e-mail clips or digests, like Info-Mac or Simulation Digest. The format is exactly like #2 above. The chapters correspond to different digests, and the sections to the articles. The chapter names must be supplied manually. But the section names are found in the "Subject:" lines.
Info-Mac is a special case of Digest format. The chapter names are also read from the file. The special format of Info-Mac is automatically recognized.
5. Dictionary: The file contains a listing of words along with their explanations, in alphabetical order. Each line is a section, the name is the first word of the line. Chapters correspond to the letters of alphabet, combining all words starting with a given letter.
Caution: Files of different formats can be mixed in a single index, such as this one. However, it is strongly recommended that a single format is used throughout the index.
----------
New index
When the user selects "New…" from the File menu, a standard file dialog is presented, and the user makes an empty index, in a folder of his choice. Untitled indexes are never created, because each index must know its folder within which the files will reside.
When the empty index appears, it is ready for modifications.
----------
Modifying an index
The "Modify…" command can only be given on an open index. It presents the modification dialog with which files are added into or removed from the index. The first action should be making sure that the proper format appears in the pop-up menu.
The files on the left-hand side can be added one by one with the ">>" button (or the Return key), or all at once with the "Add All" button. It is recommended that a single file is tried first, and then "Add All" is used after the format turns out to be correct.
The files that are selected will be analyzed one at a time. This process may be terminated by pressing the mouse key or <command><period> as usual. This results in the last added file being removed.
It is also possible to shrink the index by the "<<" button. The user may select a file on the right-hand side for removal. All the chapters in the selected file will be removed _from the index_, not from the disk. (This is not a "delete" command.)
The modification process marks the index "changed", a state which will be cleared by "Save" or "Revert" commands. If "Auto Save" option is checked, the index is immediately saved upon the exit from the dialog. In this case, Save and Revert operations will never be possible.
It should be emphasized that the text files are never modified by this process.
----------
Auto Modify
One of the most useful user options, this makes the modification process transparent to the user.
The index file under consideration is assumed to be alone in a private folder, with all the text files it combines. Whenever a new file enters the folder, dragged by the user or saved by another application, it is automatically added to the index. The current format is used in the process. If a file is deleted or otherwise moved out of the folder, it is immediately removed from the index.
When a text file is renamed, it is first removed and then readded; there is no way for Easy View to recognize such a file. Text files that are modified by another application are also treated as renamed files.
Notice that the directory will only be checked when an index is in the front. The indexes at the back are never affected.
----------
Disk vs. memory
The index data contains only names and pointers to sections. Thus, it is stored always in the memory when an index is opened. The files, however, can be arbitrarily large. Only one file is open (read-only) at a given time and only one section is read into the memory. Because of TextEdit restrictions, the _displayed_ portion of a given section cannot exceed 32K bytes.
During the modification of the index, the whole file is read into the memory (if possible) for fast processing. This may impose a practical limit on the individual files. If failure occurs in "Modify…" command, try increasing the memory allocated to the application, or dividing the larger files into smaller parts. As a rule of thumb, allocate 300K more than the size of the largest file to be added. This is not a limitation for existing indexes, as only one section per index will be in the memory.
Easy View will work within a Finder partition of 300K, but only very small files can be added in that case.
The number of sections in an index is limited by 32K, practically unlimited for most needs. The number of chapters cannot exceed 1480.
The size of the index can be calculated as follows:
22 bytes per file
14 bytes per chapter
10 bytes per section
Add to this, the total length of all file, chapter, and section names, and about 500 bytes of overhead.
----------
Modified files
If some files in an index are modified outside the application, the appearance within Easy View will be damaged. In this version, there are two ways to correct the appearance: remove the file in the Modify dialog and add it again, or close the index and make a new index with the same name. In both cases, the preferences will be retained.
If some files in an index are moved, renamed, or deleted, Easy View has no way of locating them. The index itself can be renamed safely. The index can be moved, provided that all its files are also moved to the same folder. An open index should not be moved or renamed.
----------
TidBITS & Info-Mac
Two folders are included along with Easy View: one for TidBITS and one for Info-Mac archives. These folders can be freely moved elsewhere on the disk. Once a file is downloaded, it should be put into the respective folder. The file will to be added _automatically_ into the index. These two types of files require no modification after downloading, the e-mail headers will be ignored.
Caution: if you are downloading files, make sure that you do not activate the index before the file is completely transferred. Otherwise, Easy View will work on incomplete files.
The index files supplied with Easy View have the correct settings, optimized for the compact screens. You may use the Preferences dialog to change them.
**********
Browsing
Easy View opens the files in the index in a read-only state, with no intention of modifying them. Thus, the usual editing commands "Cut", "Paste", and "Clear" are not available. The only allowed editing operation is "Copy" command, which puts the selected text into the clipboard. The usual "Copy" operation, as well as the text entry in the dialog boxes, are undoable, as a side benefit of MacApp.
Two ways of "clipping text" are supported: The user may copy any selected text or the current section into a text file. Alternatively, all the occurrences of a search string can be extracted by a single command. Both of these operations create new files by default, existing files may be used optionally. Copying and extracting to text files are naturally not undoable.
----------
Extended Copy
A user may want to deal with complete sections, rather than selections. "Copy Section" command puts the current section into the clipboard without explicitly selecting the text. This is equivalent to "Select All", then "Copy", and then restore old selection.
As another convenience to the user, "Copy To…" command toggles the destination between the clipboard and an output file. When checked, subsequent copying operations write the selected text into a file. When unchecked, all copying goes to the clipboard, as usual.
The default file selection routine makes a new text file. If the option key is pressed when the mouse is released on the menu, an existing text file will be opened in Append mode. (cf. "Extract to…")
----------
Search
A simple "Find…" command and its derivatives are supported. The basic search engine is the Munger in ROM, which can handle only case-sensitive search.
As a non-standard feature, each index may have its own search string. This turns out to be rather useful in many cases, especially when different languages or scripts are in use.
Searching may be terminated by pressing <command><period> or the mouse key as usual.
----------
Extract
All the occurrences of the current search string will be written to a text file. The default behavior is to extract the line of occurrence along with the chapter name. Optionally, the whole section may be extracted. With setext and digest formats, the resulting file will also have the correct section separators.
The default file selection routine makes a new text file. If the option key is pressed when the mouse is released on the menu, an existing text file will be opened in Append mode. (cf. "Copy to…")
Extracting may be terminated by pressing <command><period> or the mouse key as usual.
----------
Movable Modal Dialogs
There are four dialogs in Easy View, all having the same "non-standard" behavior: Preferences, Modify, Find, Style dialogs.
These dialogs behave like the Movable Modal Dialogs of System 7. The same behavior will be observed even in the earlier systems.
When one of these dialogs is active, switching to another application is possible. Edit menu will be active, only if there is an editable item. Escape key and <command><period> are equivalent to Cancel or Done buttons, all dismissing the dialog properly.
**********
Navigation
Five ways of navigation are available:
1. Mouse (this works as expected, so it needs no further explanation)
2. "Go" menu
3. Numeric keypad
4. Keyboard
5. Special keys
----------
"Go" menu
The text is displayed in three levels: chapters, sections, pages. Each of these levels has a vertical scroll bar. "Go" menu provides a quick way to go to the extremes of the scroll bars.
For those who prefer the keyboard shortcuts, all the items in this menu have numeric command key equivalents, making the keypad handy for navigation.
----------
Numeric keypad
Perhaps the most convenient way to navigate is through the numeric keypad.
Without the command key, 7-8-9 row works as "Previous ..." and 1-2-3 row as "Next ...". The leftmost keys change the chapter, the middle keys change the section, and the rightmost keys scroll pages.
With the command key, the same sets of keys have different functions, as explained in the "Go" menu: 7-8-9 row works as "First ..." and 1-2-3 row as "Last ...".
These keys never cross the boundaries of the chapters and sections.
0 (zero) key displays the previous position, quite useful after a Find command or when a wrong key is pressed by mistake.
----------
Keyboard
Since this is a browsing utility rather than an editor, the keyboard is available for entering commands. A few keys have special meanings:
Space Continue forward
b Continue backward
t Scroll to first page of current section (same as <command>9)
n Next section (same as down arrow)
p Previous section (same as up arrow)
The first of these two keys behave similar to the "rn" of unix. With the exception of "t", they may cross the chapter and section boundaries, if required. Thus, the Space key is very convenient for reading the file in a sequential fashion, using "b" or "n" once in a while.
With the command key, these keys either change their meaning completely or don't do anything. In that case, they become shortcuts for menu selection, as indicated on the respective menus.
----------
Special keys
PgUp and PgDn keys scroll page up and down in the current section. With the command key, they display first and last pages. (Equivalent to 9/3 keys)
Up and down arrows change the current section. These keys may cross the chapter boundaries, if required. With the command key, they display first and last sections, respectively. (Similar to 8/2 keys)
Left and right arrows change the current chapter. With the command key, they are reserved for Script Manager. (Similar to 7/1 keys)
Home and End keys display first and last pages, respectively. With the command key, they display first and last chapters.
**********
Preferences
Easy View handles the user options in two categories: index preferences are saved with the index, default preferences are written into the System Preferences folder.
----------
Index preferences
For each index, the information indicated below will be stored. This information will be written into the resource fork when the index is saved or closed, only if the user has modified the current values. This information will also be written when they are changed by the Preferences dialog.
+ Appearance of the lists: Font and size, justification
+ Visual length of section names (in millimeters)
+ Number of items in the lists
+ Appearance of the text: Font and size, justification, auto-wrap
+ File format (Pop-up menu)
+ Signature for "Copy to…" and "Extract to…" files
(Change this to MSWD, if you are using MS Word to edit files)
+ A set of options in the form of checkboxes
----------
Default preferences
Default preferences can be setup in the Preferences dialog in two ways: when no index window is in the front or when "Save Defaults" button is pressed.
All the index preferences will have defaults. Moreover, the user has the option of suppressing the initial Open File Dialog that appears on startup, if the application is opened from the Finder.
**********
Future directions
Easy View is a program still under development.
User comments are welcome.
----------
Compatibility
Easy View will run under System 6.0 or later. The only reason why it will not work under earlier systems is its dependence on the Script Manager and styled TextEdit. It was tested with the Arabic system, and it should behave well with other scripts, too.
The performance is quite good even on a Mac Plus. The lack of a keypad may be an annoyance on the PowerBooks.
Easy View is compatible with System 7. It recognizes the Finder aliases and opens the original files.